public class Time {


  // what's the time, Mr Wolf?

	private int hour = 0;
	private int minutes = 0;
	
	public Time(){}
	
	public Time(int hour, int minutes){
		setHour(hour);
		setMinutes(minutes);
	}
	
	public int getHour() {
		return hour;
	}
	public void setHour(int hour) {
		if (hour < 0 || hour > 23){
			throw new IllegalArgumentException("Hour must be >0 and <24");
		}
		this.hour = hour;
	}
	public int getMinutes() {
		return minutes;
	}
	public void setMinutes(int minutes) {
		if (minutes < 0 || minutes > 59){
			throw new IllegalArgumentException("Minutes must be >0 and <59");
		}
		this.minutes = minutes;
	}
	@Override
	public String toString() {
		return "Time [hour=" + hour + ", minutes=" + minutes + "]";
	}

}
